package com.rocksdata.mc.entity;

import com.rocksdata.mc.R;

import java.io.Serializable;

/**
 * Created by 陈堂正 on 2016/11/24.
 */
public class AppWidgetInfo implements Serializable{
    public static final int TYPE_APP = 0;
    public static final int TYPE_ANNOUNCEMENT = 1;
    public static final int TYPE_TIMETABLE = 2;
    public static final int TYPE_MEETING = 3;
    public static final int TYPE_EMAIL = 4;
    public static final int TYPE_CAMPUS_CARD = 5;
    public static final int TYPE_NEWS = 6;
    public static final int TYPE_WIDGET_MANAGER = 7;


    public int id;
    public int icon;
    public String name;
    public String entry;
    public int layoutId;
    public boolean isOpen = true;

    public AppWidgetInfo(){}

    public AppWidgetInfo(int id){
        this.id = id;
        switch(id){
            case TYPE_APP:
                name = "应用";
                break;
            case TYPE_ANNOUNCEMENT:
                name = "通知";
                icon = R.mipmap.ic_widget_announcement;
                entry = "com.rocksdata.mobilecampus.ui.activity.NotificationActivity";
                layoutId = R.layout.widget_announcement;
                break;
            case TYPE_TIMETABLE:
                name = "上课";
                icon = R.mipmap.ic_widget_timetable;
                entry = "com.rocksdata.mobilecampus.ui.activity.TimetableActivity";
                layoutId = R.layout.widget_timetable;
                break;
            case TYPE_MEETING:
                name = "会议";
                icon = R.mipmap.ic_widget_meeting;
                entry = "com.rocksdata.mobilecampus.ui.activity.MeetingActivity";
                layoutId = R.layout.widget_meeting;
                break;
            case TYPE_EMAIL:
                name = "邮件";
                icon = R.mipmap.ic_widget_email;
                entry = "com.rocksdata.mobilecampus.ui.activity.EmailActivity";
                layoutId = R.layout.widget_email;
                break;
            case TYPE_CAMPUS_CARD:
                name = "一卡通";
                icon = R.mipmap.ic_widget_campus_card;
                entry = "com.rocksdata.mobilecampus.ui.activity.CampusCardActivity";
                layoutId = R.layout.widget_campus_card;
                break;
            case TYPE_NEWS:
                name = "新闻";
                icon = R.mipmap.ic_widget_news;
                entry = "com.rocksdata.mobilecampus.ui.activity.NewsActivity";
                layoutId = R.layout.widget_news;
                break;
            case TYPE_WIDGET_MANAGER:
                name = "管理";
                break;
        }
    }
}
